﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Xiaov.SmartWeb.Infrastructure.ExtMethod;

namespace Xiaov.SmartWeb.Model.Domain
{
    /// <summary>
    /// 缓存UI模型
    /// </summary>
    public class CacheView
    {
        public string Name { get; set; }

        public string Value { get; set; }

        public List<CacheView> GetList()
        {
            List<CacheView> list = new List<CacheView>();

            System.Web.Caching.Cache objCache = HttpRuntime.Cache;
            IDictionaryEnumerator CacheEnum = objCache.GetEnumerator();
            while (CacheEnum.MoveNext())
            {
                CacheView CV = new CacheView();
                CV.Name = CacheEnum.Key.ToRequestString();
                CV.Value = CacheEnum.Value.ToRequestString();
                list.Add(CV);
            }
            return list;
        }
       
    }
}
